import org.graalvm.polyglot.Context

fun main() {
    val ctx = Context.newBuilder("js").allowAllAccess(true).build()
    while (true) {
        val t = System.currentTimeMillis()
        ctx.eval("js", "console.log(666)")
        println(System.currentTimeMillis() - t)
        Thread.sleep(200)
    }
}